from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
def index(request):
    return HttpResponse("session.index")

def set_session(request):
    request.session["name"] = "clay"
    request.session["uid"] = 10
    return HttpResponse("set_session")

def get_session(request):
    print(request.session.get("name"))
    print(request.session.get("uid"))
    return HttpResponse("get_session")

def del_session(request):
    # if request.session.get("name"):
    #     request.session.pop("name")

    request.session.clear()
    return HttpResponse("del_session")